[TypeDeclarationDocblocks] Avoid array<mixed, mixed> on return empty array on DocblockReturnArrayFromDirectArrayInstanceRector#7260
Conversation
|
Fixed with For note: the behaviour seems different with other rule that uses syntax: The improvement next maybe if it only |
|
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
|
Why return mixed[] for an empty array over array{}? The array is empty and with array{} you say that it is. |
|
I just know that it can use empty https://phpstan.org/r/81019bab-b81f-4dd5-bf21-02bed1fca955 Let see if it can be improved next to that |
|
The array key can never be |
|
I created PR to use array shape empty on |
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
Given the following code:
It currently got:
which I think it can just: